<!--
 * @Author: libing 9852442+liu-sheng-8667@user.noreply.gitee.com
 * @Date: 2024-04-12 22:40:10
 * @LastEditors: 花香蝶自来 1026583651@qq.com
 * @LastEditTime: 2024-05-27 22:24:06
 * @FilePath: \crm\pages\customer\conponents\order-item.vue
 * @Description: 订单item
-->
<template>
  <view class="order-item" @click="itemtap()">
    <view class="order-item-header">
      <view class="header-code">发票ID {{ item.id }}</view>
      <!-- <view class="header-status">{{ PAY_STATUS_MAP[item.payStatus] }}</view> -->
    </view>
    <view class="order-item-bottom">
      <view class="item-wrap">
        <view class="item-label">发票抬头</view>
        <view class="item-value">{{ item.rise || '-' }}</view>
      </view>
      <view class="item-wrap">
        <view class="item-label">发票类型</view>
        <view class="item-value">{{ riseType_MAP[item.riseType] || '-' }}</view>
      </view>
      <view class="item-wrap">
        <view class="item-label">发票金额</view>
        <view class="item-value">{{ item.invoiceAmount / 100 }}</view>
      </view>
    </view>
  </view>
</template>
<script>
import { riseType_MAP, riseType_ARRAY } from '@/contacts/order'
console.log(riseType_MAP, riseType_ARRAY);
export default {
  name: 'order-item',
  data() {
    return {
      riseType_ARRAY,
      riseType_MAP
    }
  },
  props: {
    item: {
      type: Object,
      default: () => ({})
    }
  },
  methods: {
    // 跳转订单详情
    toPage(path) {
      uni.navigateTo({
        url: path
      })
    },
	itemtap(){
		uni.navigateTo({
			url:"/pagesecharts/jcCustomInvoice/edit/edit?id="+this.item.id
		})
	}
  }
}
</script>
<style lang="scss" scoped>
.order-item {
  padding: 24rpx;
  background: #FFFFFF;
  margin: 18rpx;
  border-radius: 16rpx;

  &-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 22rpx;

    .header-code {
      font-size: 24rpx;
      color: #131517;
      line-height: 33rpx;
    }

    .header-status {
      background: #F2F2F3;
      border-radius: 4rpx;
      font-size: 24rpx;
      color: #838589;
      line-height: 33rpx;
      text-align: center;
      padding: 2rpx 20rpx;
    }
  }

  &-bottom {
    display: flex;
    justify-content: space-between;
    padding: 20rpx 32rpx;
    background: #F4F6FA;
    border-radius: 16rpx;

    .item-label {
      font-size: 24rpx;
      color: #838589;
      line-height: 33rpx;
      margin-bottom: 8rpx;
    }

    .item-value {
      font-size: 28rpx;
      color: #171A1D;
      line-height: 40rpx;
    }
  }
}
</style>
